import React from 'react';
import PubSub from 'pubsub-js';
import { Button } from 'antd';
import { PlusOutlined } from '@ant-design/icons';


function Createcompent() {
    const createComponent = () => {
        //发送消息----------------------------------------------------isADD
      PubSub.publish('isADD', { state: true });
    };
    return (
      <>
        <Button
          type="dashed"
          style={{ width: '100%', height: 178, marginTop: 15 }}
          onClick={createComponent}
        >
          <PlusOutlined />
          <span>新建组件</span>
        </Button>
      </>
    );
  }
  
  export default Createcompent;